package com.twu.biblioteca;

import java.io.OutputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class BibliotecaApp {

    public List<String> bookList = new ArrayList<String>(
            Arrays.asList("Book One", "Book Two", "Book Three"));
    private PrintStream stream;

    public BibliotecaApp(PrintStream stream){
        this.stream = stream;
    }

    public void go() {
        String bookListString = formatBookList(bookList);

        stream.println("Welcome!!");
        stream.println(bookListString);


    }

    private String formatBookList(List<String> bookList) {
        String listAsString = bookList.toString();

        return listAsString.substring(1, listAsString.length() - 1);
    }

}
